
user_input = input("请输入一个字符串：")

char_group = {}

for char in user_input:
    if char not in char_group:
        char_group[char] = 0
    char_group[char] += 1

for char, count in char_group.items():
    print("字符 {} 出现了 {} 次".format(char, count))
